﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace Weather3
{
    public sealed partial class PopupInputControl : UserControl
    {
        public event EventHandler OnValueChanged;
        private string inputString;
        public string InputString
        {
            get { return this.inputString; }
            set
            {
                this.inputString = value;
                if (OnValueChanged != null)
                {
                    OnValueChanged(this, new EventArgs());
                }
            }
        }

        public PopupInputControl()
        {
            this.InitializeComponent();
        }

        private void btnAdd_Click_1(object sender, RoutedEventArgs e)
        {
            this.InputString = txtInput.Text;
            Debug.WriteLine("输出1:" + InputString.ToString());
        }
    }
}
